import React, { useState, useEffect } from 'react'
import Editor from './RichBasic.js'
import { Button } from 'antd'
function EditorComponent() {
  const [content, setcontent] = useState('')
  function EditorChange(value) {
    console.log(value)
    setcontent(value)
  }
  function handleClick() {
    window.alert(content)
  }
  return (
    <div>
      <Editor
        id={'container'}
        value={content}
        callback={(content) => EditorChange(content)}
        width="100%"
        height="780px"
      ></Editor>
      <Button type="primary" onClick={handleClick}>
        点击弹出用户输入的值
      </Button>
    </div>
  )
}

export default EditorComponent
